<!DOCTYPE html>
<html>
<head>
    <title>结算详细--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/style.css"/>
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">

        function checkall() {
            var alls = document.getElementsByName("check");
            var ch = document.getElementById("checkall");
            if (ch.checked) {
                for (var i = 0; i < alls.length; i++) {
                    alls[i].checked = true;
                }
            } else {
                for (var i = 0; i < alls.length; i++) {
                    alls[i].checked = false;
                }
            }
        }

        function delAll() {
            var alls = document.getElementsByName("check");
            var ids = new Array();
            for (var i = 0; i < alls.length; i++) {
                if (alls[i].checked) {
                    ids.push(alls[i].value);
                }
            }
            if (ids.length > 0) {
                if (confirm("确认操作?")) {
                    alert("成功!");
                }
            } else {
                alert("请选中要操作的项");
            }
        }
        /**
         * 获取url参数
         */
        (function ($) {
            $.getUrlParam = function (name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]); return null;
            }
        })(jQuery);

        function backToList() {
            window.location.href="charge2.html";
        }
    </script>
</head>
<body>

<table class="table table-bordered table-hover definewidth m10">
</table>

<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <th colspan="5">
            <div>
                <button type="button" class="btn btn-success" onclick="backToList()">返回列表</button>
                <button type="button" class="btn btn-success" >导出excel</button>
            </div>
        </th>
    </tr>
</table>


<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">总花费：</td>
        <td><input id="Total_cost" disabled="disabled" name="Total_cost"></input></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">押金：</td>
        <td><input id="deposit"  disabled="disabled" name="deposit"></input></td>
    </tr>
    <tr>
        <td width="10%" class="tableleft">余额：</td>
        <td><input id="balance"  disabled="disabled" name="balance"></input></td>
    </tr>
</table>

</body>
<script>
    $(function(){
        var id = $.getUrlParam("id");
        console.log(id);
        $.ajax({
            type: "GET",
            url: "/Hospital/getCharge?id="+id,
            success: function(res){
                var total_cost = res.obj.total_cost;
                var deposit = res.obj.deposit;
                var balance = res.obj.balance;

                $("#Total_cost").val(total_cost);
                $("#deposit").val(deposit);
                $("#balance").val(balance);
            }
        });
    })
</script>
</html>
